package org.lixf.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.sql.DataSource;

@Configuration
@ComponentScan("org.lixf.biz")
@EnableTransactionManagement
public class BizConfig {
    @Bean
    public DataSourceTransactionManager dataSourceTransactionManager(DataSource dataSource){
        // System.out.println(dataSource);
        return new DataSourceTransactionManager(dataSource);
    }
}
